#include <stdio.h>
#include "PrintManager.h"
#include "PrintString.h"

PrintManager::PrintManager()
{
	printStringList = NULL;
}

PrintManager::~PrintManager()
{
	if(printStringList)
		delete(printStringList);
	printStringList = NULL;
}
void PrintManager::Clear()
{
	if(printStringList)
		delete(printStringList);
	printStringList = NULL;
}
char * PrintManager::Click(Vector2D mousePosition)
{
	if(printStringList)
		return printStringList->Click(mousePosition);
	return NULL;	
}
void PrintManager::Print(char * string, Vector2D position, float size)
{
	if(!printStringList)
		printStringList = new PrintStringList(new PrintString(textureManager, string, position, size));
	else
		printStringList->Add(new PrintString(textureManager, string, position, size));
}
void PrintManager::SetTextureManager(TextureManager * textureManager)
{
	this->textureManager = textureManager;
}

void PrintManager::Draw()
{
	if(printStringList)
		printStringList->Draw();
}